package com.maixun.lib_comment.interceptor

import com.maixun.lib_comment.UserInfoManager
import okhttp3.Interceptor
import okhttp3.Response

/**
 * 作者：Lmoumou
 * 时间：2020/8/10 13:56
 */
class NetInterceptor: Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val builder = chain.request().newBuilder()
        //添加请求头
        builder.addHeader("uetk", UserInfoManager.getToken())
        return chain.proceed(builder.build())
    }
}